import React from 'react';
import PropTypes from 'prop-types';
import { Link, Route } from 'dva/router';
import DocumentTitle from 'react-document-title';
import { Icon } from 'antd';

import styles from './UserLayout.less';



class UserLayout extends React.PureComponent {
  static childContextTypes = {
    location: PropTypes.object,
  }
  getChildContext() {
    const { location } = this.props;
    return { location };
  }
  render() {
    const { getRouteData } = this.props;
    return (
      <DocumentTitle title="彩域宽带管理系统">
        <div className={styles.container} style={{ backgroundImage: 'url(./img/background.png)' }}>
          <div className={styles.top}>
            
            {/*
            <div className={styles.desc}>深圳市智慧湾数据平台</div> */}
          </div>
          {
            getRouteData('UserLayout').map(item =>
              (
                <Route
                  exact={item.exact}
                  key={item.path}
                  path={item.path}
                  component={item.component}
                />
              )
            )
          }
         
        </div>
      </DocumentTitle>
    );
  }
}

export default UserLayout;
